import request from "@/utils/http/axios/Axios.ts";
import {loginForm, loginResponse, userInfoResponse} from "@/api/system/user/type.ts";

enum userApi {
    LOGIN_URL = '/admin/acl/index/login',
    USER_INFO = '/admin/acl/index/info',
    LOGOUT_URL = '/admin/acl/index/logout',
}

export const reqLogin = (data: loginForm) => request.post<any, loginResponse>(userApi.LOGIN_URL, data)

export const reqUserInfo = () => request.get<any, userInfoResponse>(userApi.USER_INFO)

export const reqLogout = () => request.post<any, any>(userApi.LOGOUT_URL)